import { GET_ITEM_OBJ, GET_SWIPER_ARR, GET_JIESHAO_LIST } from '../content'

const initItemData = {}
const itemdata = (state = initItemData, action) => {
    const { type, data } = action
    switch (type) {
        case GET_ITEM_OBJ:
            return Object.assign({}, state, { itemObj: data });
        case GET_SWIPER_ARR:
            return Object.assign({}, state, { swiperArr: data });
        case GET_JIESHAO_LIST:
            return Object.assign({}, state, { jieshaolist: data });
        default:
            return state
    }
}
export default itemdata